name: pre-commit run_id: commands[0] env HOME: /home/jenkins env LANG: C.UTF-8 env PATH: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit/bin:/opt/pyenv/bin:/tmp/venv-pvqL/bin:/opt/pyenv/shims:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PYTHONHASHSEED: 3016112407 env PYTHONIOENCODING: utf-8 env SSH_AUTH_SOCK: ******************************** env TOX_ENV_DIR: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit env TOX_ENV_NAME: pre-commit env TOX_WORK_DIR: /w/workspace/bgpcep-tox-verify-master/.tox env VIRTUAL_ENV: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit env __TOX_ENVIRONMENT_VARIABLE_ORIGINAL_CI: true metadata pid: 2385 cwd: /w/workspace/bgpcep-tox-verify-master allow: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit/bin/* cmd: pre-commit run --all-files --show-diff-on-failure exit_code: 1 [WARNING] hook id `remove-tabs` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [WARNING] repo `https://github.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often `pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks` will fix this. if it does not -- consider reporting an issue to that repo. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 - files were modified by this hook Fixing tests/suites/bgp_ingest/test_bgp_app_manypeer_prefix_count.py Fixing tests/libraries/utils.py Fixing tests/libraries/prefix_counting.py Fixing tests/suites/bgp_ingest/test_singlepeer_change_count.py Fixing tests/suites/bgp_ingest/test_bgp_app_singlepeer_prefix_count.py Tabs remover.............................................................Failed - hook id: remove-tabs - exit code: 1 - files were modified by this hook Substituting tabs in: tests/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp3.cfg by 4 whitespaces Substituting tabs in: tests/variables/bgpfunctional/addNeighborsContainer_bgp/post_data.json by 4 whitespaces Tabs have been successfully removed. Now aborting the commit. You can check the changes made. Then simply "git add --update ." and re-commit pre-commit hook(s) made changes. If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. To run `pre-commit` as part of git workflow, use `pre-commit install`. All changes made by hooks: diff --git a/tests/libraries/prefix_counting.py b/tests/libraries/prefix_counting.py index 9909bdb0e2..dd9fd175d0 100644 --- a/tests/libraries/prefix_counting.py +++ b/tests/libraries/prefix_counting.py @@ -58,7 +58,7 @@ def get_ipv4_topology_prefixes_count(topology: str = "example-ipv4-topology"): def check_ipv4_topology_prefixes_count(expected_count: int, topology: str = "example-ipv4-topology"): """Check that the count of prefixes matches the expected count - + Args: topology (str): name of the IPv4 topology to be checked. @@ -70,7 +70,7 @@ def check_ipv4_topology_prefixes_count(expected_count: int, topology: str = "exa def check_ipv4_topology_is_empty(topology: str = "example-ipv4-topology"): """Verifies if the ipv4 topology does not containe any prefix - + Args: topology (str): name of the IPv4 topology to be checked. diff --git a/tests/libraries/utils.py b/tests/libraries/utils.py index aa3a30906e..6d6a6cad4c 100644 --- a/tests/libraries/utils.py +++ b/tests/libraries/utils.py @@ -121,7 +121,7 @@ def wait_until_function_returns_value_with_custom_value_validator( def verify_process_did_not_stop_immediately(pid: int, retry_count: int = 10, interval: int = 1): """Verifies if just started process did not stop immediately - + This verification process is done by repeatedly checking the process status Args: diff --git a/tests/suites/bgp_ingest/test_bgp_app_manypeer_prefix_count.py b/tests/suites/bgp_ingest/test_bgp_app_manypeer_prefix_count.py index 8717127659..f8ca0deda5 100644 --- a/tests/suites/bgp_ingest/test_bgp_app_manypeer_prefix_count.py +++ b/tests/suites/bgp_ingest/test_bgp_app_manypeer_prefix_count.py @@ -93,7 +93,7 @@ class TestBgpAppManyPeerPrefixCount: """Start BGP peer tool""" self.bgp_speaker_process = bgp.start_bgp_speaker( ammount=0, - multiplicity=BGP_PEERS_COUNT, + multiplicity=BGP_PEERS_COUNT, my_ip=TOOLS_IP, my_port=BGP_TOOL_PORT, peer_ip=ODL_IP, @@ -116,9 +116,9 @@ class TestBgpAppManyPeerPrefixCount: "step_wait_for_ip_topology_is_prefilled" ): """Wait until example-ipv4-topology reaches the target prfix count.""" - utils.wait_until_function_pass(CHECK_RETRY_COUNT, - CHECK_INTERVAL, - prefix_counting.check_ipv4_topology_prefixes_count, + utils.wait_until_function_pass(CHECK_RETRY_COUNT, + CHECK_INTERVAL, + prefix_counting.check_ipv4_topology_prefixes_count, PREFILL_COUNT) with allure_step_with_separate_logging( @@ -151,9 +151,9 @@ class TestBgpAppManyPeerPrefixCount: with allure_step_with_separate_logging("step_wait_for_ip_topology_is_filled"): """Wait until example-ipv4-topology reaches the target prfix count.""" - utils.wait_until_function_pass(CHECK_RETRY_COUNT, - CHECK_INTERVAL, - prefix_counting.check_ipv4_topology_prefixes_count, + utils.wait_until_function_pass(CHECK_RETRY_COUNT, + CHECK_INTERVAL, + prefix_counting.check_ipv4_topology_prefixes_count, TOTAL_COUNT) with allure_step_with_separate_logging( diff --git a/tests/suites/bgp_ingest/test_bgp_app_singlepeer_prefix_count.py b/tests/suites/bgp_ingest/test_bgp_app_singlepeer_prefix_count.py index 30a26feec7..44f38a3c8e 100644 --- a/tests/suites/bgp_ingest/test_bgp_app_singlepeer_prefix_count.py +++ b/tests/suites/bgp_ingest/test_bgp_app_singlepeer_prefix_count.py @@ -118,9 +118,9 @@ class TestBgpAppPeerPrefixCount: "step_wait_for_ip_topology_is_prefilled" ): """Wait until example-ipv4-topology reaches the target prfix count.""" - utils.wait_until_function_pass(CHECK_RETRY_COUNT, - CHECK_INTERVAL, - prefix_counting.check_ipv4_topology_prefixes_count, + utils.wait_until_function_pass(CHECK_RETRY_COUNT, + CHECK_INTERVAL, + prefix_counting.check_ipv4_topology_prefixes_count, PREFILL_COUNT) with allure_step_with_separate_logging( @@ -152,9 +152,9 @@ class TestBgpAppPeerPrefixCount: with allure_step_with_separate_logging("step_wait_for_ip_topology_is_filled"): """Wait until example-ipv4-topology reaches the target prfix count.""" - utils.wait_until_function_pass(CHECK_RETRY_COUNT, - CHECK_INTERVAL, - prefix_counting.check_ipv4_topology_prefixes_count, + utils.wait_until_function_pass(CHECK_RETRY_COUNT, + CHECK_INTERVAL, + prefix_counting.check_ipv4_topology_prefixes_count, TOTAL_COUNT) with allure_step_with_separate_logging( @@ -179,12 +179,12 @@ class TestBgpAppPeerPrefixCount: with allure_step_with_separate_logging("step_reconnect_bgp_peer"): """Start BGP peer tool.""" TestBgpAppPeerPrefixCount.bgp_speaker_process = bgp.start_bgp_speaker( - ammount=0, + ammount=0, my_ip=TOOLS_IP, my_port=BGP_TOOL_PORT, peer_ip=ODL_IP, peer_port=ODL_BGP_PORT, - listen=False, + listen=False, log_level=BGP_TOOL_LOG_LEVEL ) utils.verify_process_did_not_stop_immediately(self.bgp_speaker_process) diff --git a/tests/suites/bgp_ingest/test_singlepeer_change_count.py b/tests/suites/bgp_ingest/test_singlepeer_change_count.py index 672d9417b1..2e71791192 100644 --- a/tests/suites/bgp_ingest/test_singlepeer_change_count.py +++ b/tests/suites/bgp_ingest/test_singlepeer_change_count.py @@ -12,8 +12,8 @@ # make sure it is added to "install-features" of any jobs that are going # to invoke it. # -# The suite consists of two halves, differing on which side initiates BGP -# connection. Data change counter is a lightweight way to detect +# The suite consists of two halves, differing on which side initiates BGP +# connection. Data change counter is a lightweight way to detect # "work is being done". Utils library provide a nice function to wait for # stability, but it needs initial value, that is why last_change_count_single # appears just before work-inducing action. diff --git a/tests/variables/bgpfunctional/addNeighborsContainer_bgp/post_data.json b/tests/variables/bgpfunctional/addNeighborsContainer_bgp/post_data.json index e6e09e2438..7afa3b9a95 100644 --- a/tests/variables/bgpfunctional/addNeighborsContainer_bgp/post_data.json +++ b/tests/variables/bgpfunctional/addNeighborsContainer_bgp/post_data.json @@ -1,10 +1,10 @@ { - "neighborsContainer": { - "neighbors":[ - { - "address":"$neighborAddr", - "remote-as":$remoteas - } - ] - } + "neighborsContainer": { + "neighbors":[ + { + "address":"$neighborAddr", + "remote-as":$remoteas + } + ] + } } diff --git a/tests/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp3.cfg b/tests/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp3.cfg index 17f86a802f..aba39f0d74 100644 --- a/tests/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp3.cfg +++ b/tests/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp3.cfg @@ -15,7 +15,7 @@ neighbor ODLIP { extended-community [ target:24563:7.35.75.46 ]; label 256; } - } + } capability { route-refresh ROUTEREFRESH;